<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'locality-form',
	'enableAjaxValidation'=>false,
));

    if(!isset($enabled)){
        $enabled = true;
    }

    ?>

	<p class="note">Обязательные поля <span class="required">*</span></p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'country'); ?>
        <? if($enabled): ?>
		    <?php echo $form->textField($model,'country',array('size'=>60,'maxlength'=>100)); ?>
        <? else: echo $model->country; endif; ?>
		<?php echo $form->error($model,'country'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'region'); ?>
        <? if($enabled): ?>
		    <?php echo $form->textField($model,'region',array('size'=>60,'maxlength'=>100)); ?>
        <? else: echo $model->region; endif; ?>
		<?php echo $form->error($model,'region'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'city'); ?>
        <? if($enabled): ?>
		    <?php echo $form->textField($model,'city',array('size'=>60,'maxlength'=>100)); ?>
        <? else: echo $model->city; endif; ?>
		<?php echo $form->error($model,'city'); ?>
	</div>
    <? if($enabled): ?>
        <div class="row buttons">
            <?php echo CHtml::submitButton($model->isNewRecord ? 'Создать' : 'Сохранить'); ?>
        </div>
    <? endif; ?>
<?php $this->endWidget(); ?>

</div><!-- form -->